<form ng-submit="formSubmit()" class="form-horizontal">
<div class="modal-header">
		<div class="btn-group pull-left">
			<a class="btn btn-danger" data-dismiss="modal" ng-click="cancel()">
				Cancel
			</a>
		</div>
		
		<div class="btn-group pull-right">
			<button class="btn btn-primary" data-dismiss="modal" ng-disabled="fileToUpload == null" ng-click="uploadFileClicked()">
				Upload File
			</button>
		</div>
		<div class="btn-group pull-right">
			<button class="btn btn-primary" data-dismiss="modal" ng-show="getRestfulURLUploadURL != null" ng-disabled="urlToUpload == null || urlToUpload.trim() == '' || filenameToUpload == null || filenameToUpload == ''" ng-click="uploadURLClicked()">
				Upload URL
			</button>
		</div>
		<h4 class="modal-title">
				{{title}}
		</h4>
</div>
<div class="modal-body">
		<div class="form-group" ng-show="getRestfulURLUploadURL != null">
			<label class="col-xs-4 control-label">URL</label>
			<div class="col-xs-8">
				<input type="text" class="form-control" placeholder="URL" ng-model="urlToUpload" ng-required="urlToUpload != null || filenameToUpload != null">
			</div>
		</div>
		<div class="form-group" ng-show="getRestfulURLUploadURL != null">
			<label class="col-xs-4 control-label">Filename</label>
			<div class="col-xs-8">
				<input type="text" class="form-control" placeholder="filename.filetype" ng-model="filenameToUpload" ng-required="urlToUpload != null || filenameToUpload != null">
			</div>
		</div>
		<div class="form-group" ng-show="getRestfulURLUploadURL != null">
			<label class="col-xs-4 control-label"></label>
			<div class="col-xs-8">OR</div>
		</div>
		<div class="form-group">
			<label class="col-xs-4 control-label"></label>
			<div class="col-md-8">
				<!-- <input id="choosefilebutton" onchange="angular.element(this).scope().fileChanged(this)" type="file" /> -->
				<input ngf-select ng-model="fileToUpload" name="file" type="file" accept="{{supportedFileTypes}}">
  			</div>
		</div>
		<div class="progress">
		  <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" id="progressbar"
		  aria-valuenow="90" aria-valuemin="0" aria-valuemax="100">
		  </div>
		</div>
</div>
</form>

<div class="modal-footer">
	<span ng-include="'cardFooter.html'"></span>
</div>	
